import Layout from '@/views/layout/Layout'

const tinysaleRouter = {
  path: '/tinysale',
  name: 'Tinysale',
  component: Layout,
  redirect: '/tinysale/about',
  meta: { title: '微营销', icon: 'money' },
  children: [
    {
      path: 'about',
      name: 'tinysaleAbout',
      component: () =>
        import('@/views/tinysale/about'),
      meta: {
        title: '微营销概览'
      }
    },
    {
      path: 'activity',
      name: 'TinysaleActivity',
      component: () =>
        import('@/views/tinysale/activity'),
      redirect: '/tinysale/activity/addActivity',
      meta: { title: '' },
      children: [
        {
          path: 'addActivity',
          name: 'activity-create',
          component: () =>
            import('@/views/tinysale/addActivity'),
          meta: {
            title: '新建活动'
          }
        },
        {
          path: 'seckillSet',
          name: 'SeckillSet',
          component: () =>
            import('@/views/tinysale/components/addActivity/seckillSet'),
          meta: {
            title: '活动管理'
          },
          hidden: true
        },
        {
          path: 'userSet',
          name: 'UserSet',
          component: () =>
            import('@/views/tinysale/components/addActivity/userSet'),
          meta: {
            title: '活动详情设置'
          },
          hidden: true
        },
        {
          path: 'qrcode',
          name: 'activity-qrcode',
          component: () =>
            import('@/views/tinysale/qrcode'),
          meta: {
            title: '二维码'
          },
          hidden: true
        },
        {
          path: 'question',
          name: 'activity-question',
          component: () =>
            import('@/views/tinysale/question'),
          meta: {
            title: '问题列表'
          },
          hidden: true
        },
        {
          path: 'startactivity',
          name: 'activity-startactivity',
          component: () =>
            import('@/views/tinysale/startactivity'),
          meta: {
            title: '开始活动'
          },
          hidden: true
        },
        {
          path: 'order',
          name: 'activity-order',
          component: () =>
            import('@/views/tinysale/order'),
          meta: {
            title: '订单详情'
          },
          hidden: true
        },
        {
          path: 'data',
          name: 'activity-data',
          component: () =>
            import('@/views/tinysale/data'),
          meta: {
            title: '活动数据'
          },
          hidden: true
        }
      ]
    },
    {
      path: 'selfActivity',
      name: 'SelfTinysaleActivity',
      component: () => import('@/views/tinysale/selfActivity'),
      redirect: '/tinysale/selfActivity/ongoing',
      meta: {
        title: '我的活动'
      },
      children: [
        {
          path: 'unstart',
          name: 'Unstart',
          component: () => import('@/views/tinysale/components/selfActivity/unstart'),
          meta: {
            title: '未开始活动',
            hidden: true
          },
          hidden: true
        },
        {
          path: 'ongoing',
          name: 'Ongoing',
          component: () => import('@/views/tinysale/components/selfActivity/ongoing'),
          meta: {
            title: '进行中活动',
            hidden: true
          },
          hidden: true
        },
        {
          path: 'closed',
          name: 'Closed',
          component: () => import('@/views/tinysale/components/selfActivity/closed'),
          meta: {
            title: '已结束活动',
            hidden: true
          },
          hidden: true
        }
      ]
    },
    {
      path: 'myorder',
      name: 'Myorder',
      component: () =>
        import('@/views/tinysale/myorder'),
      meta: {
        title: '我的订单'
      }
    },
    {
      path: 'account',
      name: 'TinysaleAccount',
      component: () =>
        import('@/views/tinysale/account'),
      meta: {
        title: '账户'
      }
    },
    {
      path: 'setting',
      name: 'TinysaleSetting',
      component: () =>
        import('@/views/tinysale/setting'),
      meta: {
        title: '设置'
      }
    }
  ]
}
export default tinysaleRouter
